<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="generator" content="ApiGen 2.8.0" />

	<title>Class FileValidationBehavior</title>

	<script type="text/javascript" src="resources/combined.js?394153670"></script>
	<script type="text/javascript" src="elementlist.js?1800566221"></script>
	<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360" />

</head>

<body>
<div id="left">
	<div id="menu">
		<a href="index.html" title="Overview"><span>Overview</span></a>


		<div id="groups">
			<h3>Packages</h3>
			<ul>
				<li><a href="package-abismo.html">abismo<span></span></a>
						<ul>
				<li><a href="package-abismo.admin.html">admin</a>
						</li>
				<li><a href="package-abismo.home.html">home</a>
						</li>
				<li><a href="package-abismo.images.html">images</a>
						</li>
				<li><a href="package-abismo.projects.html">projects</a>
						</li>
				<li><a href="package-abismo.Services.html">Services</a>
						</li>
				<li><a href="package-abismo.studio.html">studio</a>
						</li>
				<li><a href="package-abismo.tenders.html">tenders</a>
						</li>
				<li><a href="package-abismo.users.html">users</a>
						</li>
				<li><a href="package-abismo.videos.html">videos</a>
						</li>
				<li><a href="package-abismo.view.html">view<span></span></a>
						<ul>
				<li><a href="package-abismo.view.helpers.html">helpers</a>
						</li>
							</ul></li></ul></li>
				<li><a href="package-app.html">app<span></span></a>
						<ul>
				<li><a href="package-app.Config.html">Config<span></span></a>
						<ul>
				<li><a href="package-app.Config.Schema.html">Schema</a>
						</li>
							</ul></li>
				<li><a href="package-app.Model.html">Model<span></span></a>
						<ul>
				<li><a href="package-app.Model.debug.html">debug<span></span></a>
						<ul>
				<li><a href="package-app.Model.debug.kit.html">kit</a>
						</li>
							</ul></li></ul></li>
				<li><a href="package-app.View.html">View<span></span></a>
						<ul>
				<li><a href="package-app.View.Helper.html">Helper<span></span></a>
						<ul>
				<li><a href="package-app.View.Helper.debug.html">debug<span></span></a>
						<ul>
				<li><a href="package-app.View.Helper.debug.kit.html">kit<span></span></a>
						<ul>
				<li><a href="package-app.View.Helper.debug.kit.views.html">views<span></span></a>
						<ul>
				<li><a href="package-app.View.Helper.debug.kit.views.helpers.html">helpers</a>
						</li>
							</ul></li></ul></li></ul></li></ul></li></ul></li></ul></li>
				<li><a href="package-cake.html">cake<span></span></a>
						<ul>
				<li><a href="package-cake.debug.html">debug<span></span></a>
						<ul>
				<li><a href="package-cake.debug.kit.html">kit<span></span></a>
						<ul>
				<li><a href="package-cake.debug.kit.panels.html">panels</a>
						</li>
							</ul></li></ul></li></ul></li>
				<li><a href="package-debug.html">debug<span></span></a>
						<ul>
				<li><a href="package-debug.kit.html">kit<span></span></a>
						<ul>
				<li><a href="package-debug.kit.components.html">components</a>
						</li>
				<li><a href="package-debug.kit.controllers.html">controllers<span></span></a>
						<ul>
				<li><a href="package-debug.kit.controllers.components.html">components</a>
						</li>
							</ul></li>
				<li><a href="package-debug.kit.Lib.html">Lib</a>
						</li>
				<li><a href="package-debug.kit.models.html">models<span></span></a>
						<ul>
				<li><a href="package-debug.kit.models.behaviors.html">behaviors</a>
						</li>
							</ul></li>
				<li><a href="package-debug.kit.vendors.html">vendors</a>
						</li>
				<li><a href="package-debug.kit.views.html">views<span></span></a>
						<ul>
				<li><a href="package-debug.kit.views.helpers.html">helpers</a>
						</li>
							</ul></li></ul></li></ul></li>
				<li><a href="package-localized.html">localized</a>
						</li>
				<li><a href="package-Localized.html">Localized<span></span></a>
						<ul>
				<li><a href="package-localized.tests.html">tests<span></span></a>
						<ul>
				<li><a href="package-localized.tests.cases.html">cases<span></span></a>
						<ul>
				<li><a href="package-localized.tests.cases.libs.html">libs</a>
						</li>
							</ul></li></ul></li>
				<li><a href="package-Localized.Validation.html">Validation</a>
						</li>
							</ul></li>
				<li class="active"><a href="package-None.html">None</a>
						</li>
				<li><a href="package-PHP.html">PHP</a>
						</li>
			</ul>
		</div>

		<hr />


		<div id="elements">
			<h3>Classes</h3>
			<ul>
				<li><a href="class-AbismoAppSchema.html" class="invalid">AbismoAppSchema</a></li>
				<li><a href="class-AppController.html">AppController</a></li>
				<li><a href="class-AttachmentBehavior.html">AttachmentBehavior</a></li>
				<li><a href="class-BootstrapFormHelper.html">BootstrapFormHelper</a></li>
				<li><a href="class-BootstrapPaginatorHelper.html">BootstrapPaginatorHelper</a></li>
				<li><a href="class-BootstrapSessionHelper.html">BootstrapSessionHelper</a></li>
				<li><a href="class-ContactoController.html">ContactoController</a></li>
				<li><a href="class-DATABASE_CONFIG.html">DATABASE_CONFIG</a></li>
				<li><a href="class-FancyboxAppController.html">FancyboxAppController</a></li>
				<li><a href="class-FancyboxController.html">FancyboxController</a></li>
				<li class="active"><a href="class-FileValidationBehavior.html">FileValidationBehavior</a></li>
			</ul>





		</div>
	</div>
</div>

<div id="splitter"></div>

<div id="right">
<div id="rightInner">
	<form id="search">
		<input type="hidden" name="cx" value="" />
		<input type="hidden" name="ie" value="UTF-8" />
		<input type="text" name="q" class="text" />
		<input type="submit" value="Search" />
	</form>

	<div id="navigation">
		<ul>
			<li>
				<a href="index.html" title="Overview"><span>Overview</span></a>
			</li>
			<li>
				<a href="package-None.html" title="Summary of None"><span>Package</span></a>
			</li>
			<li class="active">
<span>Class</span>			</li>
		</ul>
		<ul>
			<li>
				<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
			</li>
		</ul>
		<ul>
		</ul>
	</div>

<div id="content" class="class">
	<h1>Class FileValidationBehavior</h1>


	<div class="description">
	
<p>A CakePHP Behavior that adds validation model rules to file uploading.</p>

	</div>

	<dl class="tree">
		<dd style="padding-left:0px">
ModelBehavior
			
			
		</dd>
		<dd style="padding-left:30px">
			<img src="resources/inherit.png" alt="Extended by" />
<b><span>FileValidationBehavior</span></b>			
			
			
		</dd>
	</dl>








	<div class="info">
		
		
		
		

				<b>Copyright:</b>
				Copyright 2006-2013, Miles Johnson - <a
href="http://milesj.me">http://milesj.me</a><br />
				<b>License:</b>
				<a href="http://opensource.org/licenses/mit-license.php">- Licensed under the MIT License</a><br />
		<b>Located at</b> <a href="source-class-FileValidationBehavior.html#13-442" title="Go to source code">Plugin/Uploader/Model/Behavior/FileValidationBehavior.php</a><br />
	</div>



	<table class="summary" id="methods">
	<caption>Methods summary</caption>
	<tr data-order="setup" id="_setup">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_setup">#</a>
		<code><a href="source-class-FileValidationBehavior.html#86-98" title="Go to source code">setup</a>( <span>Model <var>$model</var></span>, <span>array <var>$settings</var> = <span class="php-keyword1">array</span>()</span> )</code>

		<div class="description short">
			
<p>Setup the validation and model settings.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Setup the validation and model settings.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$model</var></dt>
					<dd><code>Model</code><br>$model</dd>
					<dt><var>$settings</var></dt>
					<dd><code>array</code><br>$settings</dd>
				</dl></div>





		</div>
		</div></td>
	</tr>
	<tr data-order="filesize" id="_filesize">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_filesize">#</a>
		<code><a href="source-class-FileValidationBehavior.html#100-110" title="Go to source code">filesize</a>( <span>Model <var>$model</var></span>, <span>array <var>$data</var></span>, <span>integer <var>$size</var> = <span class="php-num">5242880</span></span> )</code>

		<div class="description short">
			
<p>Validates an image file size. Default max size is 5 MB.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Validates an image file size. Default max size is 5 MB.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$model</var></dt>
					<dd><code>Model</code><br>$model</dd>
					<dt><var>$data</var></dt>
					<dd><code>array</code><br>$data</dd>
					<dt><var>$size</var></dt>
					<dd><code>integer</code><br>$size</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="height" id="_height">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_height">#</a>
		<code><a href="source-class-FileValidationBehavior.html#112-122" title="Go to source code">height</a>( <span>Model <var>$model</var></span>, <span>array <var>$data</var></span>, <span>integer <var>$size</var></span> )</code>

		<div class="description short">
			
<p>Checks that the image height is exact.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Checks that the image height is exact.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$model</var></dt>
					<dd><code>Model</code><br>$model</dd>
					<dt><var>$data</var></dt>
					<dd><code>array</code><br>$data</dd>
					<dt><var>$size</var></dt>
					<dd><code>integer</code><br>$size</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="width" id="_width">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_width">#</a>
		<code><a href="source-class-FileValidationBehavior.html#124-134" title="Go to source code">width</a>( <span>Model <var>$model</var></span>, <span>array <var>$data</var></span>, <span>integer <var>$size</var></span> )</code>

		<div class="description short">
			
<p>Checks that the image width is exact.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Checks that the image width is exact.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$model</var></dt>
					<dd><code>Model</code><br>$model</dd>
					<dt><var>$data</var></dt>
					<dd><code>array</code><br>$data</dd>
					<dt><var>$size</var></dt>
					<dd><code>integer</code><br>$size</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="maxHeight" id="_maxHeight">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_maxHeight">#</a>
		<code><a href="source-class-FileValidationBehavior.html#136-146" title="Go to source code">maxHeight</a>( <span>Model <var>$model</var></span>, <span>array <var>$data</var></span>, <span>integer <var>$size</var></span> )</code>

		<div class="description short">
			
<p>Checks the maximum image height.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Checks the maximum image height.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$model</var></dt>
					<dd><code>Model</code><br>$model</dd>
					<dt><var>$data</var></dt>
					<dd><code>array</code><br>$data</dd>
					<dt><var>$size</var></dt>
					<dd><code>integer</code><br>$size</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="maxWidth" id="_maxWidth">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_maxWidth">#</a>
		<code><a href="source-class-FileValidationBehavior.html#148-158" title="Go to source code">maxWidth</a>( <span>Model <var>$model</var></span>, <span>array <var>$data</var></span>, <span>integer <var>$size</var></span> )</code>

		<div class="description short">
			
<p>Checks the maximum image width.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Checks the maximum image width.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$model</var></dt>
					<dd><code>Model</code><br>$model</dd>
					<dt><var>$data</var></dt>
					<dd><code>array</code><br>$data</dd>
					<dt><var>$size</var></dt>
					<dd><code>integer</code><br>$size</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="minHeight" id="_minHeight">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_minHeight">#</a>
		<code><a href="source-class-FileValidationBehavior.html#160-170" title="Go to source code">minHeight</a>( <span>Model <var>$model</var></span>, <span>array <var>$data</var></span>, <span>integer <var>$size</var></span> )</code>

		<div class="description short">
			
<p>Checks the minimum image height.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Checks the minimum image height.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$model</var></dt>
					<dd><code>Model</code><br>$model</dd>
					<dt><var>$data</var></dt>
					<dd><code>array</code><br>$data</dd>
					<dt><var>$size</var></dt>
					<dd><code>integer</code><br>$size</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="minWidth" id="_minWidth">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_minWidth">#</a>
		<code><a href="source-class-FileValidationBehavior.html#172-182" title="Go to source code">minWidth</a>( <span>Model <var>$model</var></span>, <span>array <var>$data</var></span>, <span>integer <var>$size</var></span> )</code>

		<div class="description short">
			
<p>Checks the minimum image width.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Checks the minimum image width.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$model</var></dt>
					<dd><code>Model</code><br>$model</dd>
					<dt><var>$data</var></dt>
					<dd><code>array</code><br>$data</dd>
					<dt><var>$size</var></dt>
					<dd><code>integer</code><br>$size</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="extension" id="_extension">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_extension">#</a>
		<code><a href="source-class-FileValidationBehavior.html#184-194" title="Go to source code">extension</a>( <span>Model <var>$model</var></span>, <span>array <var>$data</var></span>, <span>array <var>$allowed</var> = <span class="php-keyword1">array</span>()</span> )</code>

		<div class="description short">
			
<p>Validates the extension.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Validates the extension.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$model</var></dt>
					<dd><code>Model</code><br>$model</dd>
					<dt><var>$data</var></dt>
					<dd><code>array</code><br>$data</dd>
					<dt><var>$allowed</var></dt>
					<dd><code>array</code><br>$allowed</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="type" id="_type">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_type">#</a>
		<code><a href="source-class-FileValidationBehavior.html#196-206" title="Go to source code">type</a>( <span>Model <var>$model</var></span>, <span>array <var>$data</var></span>, <span>array <var>$allowed</var> = <span class="php-keyword1">array</span>()</span> )</code>

		<div class="description short">
			
<p>Validates the type, e.g., image.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Validates the type, e.g., image.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$model</var></dt>
					<dd><code>Model</code><br>$model</dd>
					<dt><var>$data</var></dt>
					<dd><code>array</code><br>$data</dd>
					<dt><var>$allowed</var></dt>
					<dd><code>array</code><br>$allowed</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="mimeType" id="_mimeType">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_mimeType">#</a>
		<code><a href="source-class-FileValidationBehavior.html#208-218" title="Go to source code">mimeType</a>( <span>Model <var>$model</var></span>, <span>array <var>$data</var></span>, <span>array|string <var>$mimeType</var></span> )</code>

		<div class="description short">
			
<p>Validates the mime type, e.g., image/jpeg.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Validates the mime type, e.g., image/jpeg.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$model</var></dt>
					<dd><code>Model</code><br>$model</dd>
					<dt><var>$data</var></dt>
					<dd><code>array</code><br>$data</dd>
					<dt><var>$mimeType</var></dt>
					<dd><code>array|string</code><br>$mimeType</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="required" id="_required">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_required">#</a>
		<code><a href="source-class-FileValidationBehavior.html#220-236" title="Go to source code">required</a>( <span>Model <var>$model</var></span>, <span>array <var>$data</var></span>, <span>boolean <var>$required</var> = <span class="php-keyword1">true</span></span> )</code>

		<div class="description short">
			
<p>Makes sure a file field is required and not optional.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Makes sure a file field is required and not optional.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$model</var></dt>
					<dd><code>Model</code><br>$model</dd>
					<dt><var>$data</var></dt>
					<dd><code>array</code><br>$data</dd>
					<dt><var>$required</var></dt>
					<dd><code>boolean</code><br>$required</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="beforeValidate" id="_beforeValidate">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_beforeValidate">#</a>
		<code><a href="source-class-FileValidationBehavior.html#238-323" title="Go to source code">beforeValidate</a>( <span>Model <var>$model</var></span> )</code>

		<div class="description short">
			
<p>Build the validation rules and validate.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Build the validation rules and validate.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$model</var></dt>
					<dd><code>Model</code><br>$model</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="afterValidate" id="_afterValidate">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_afterValidate">#</a>
		<code><a href="source-class-FileValidationBehavior.html#325-337" title="Go to source code">afterValidate</a>( <span>Model <var>$model</var></span> )</code>

		<div class="description short">
			
<p>Delete the temporary file.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Delete the temporary file.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$model</var></dt>
					<dd><code>Model</code><br>$model</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="_allowEmpty" id="__allowEmpty">

		<td class="attributes"><code>
			 protected 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#__allowEmpty">#</a>
		<code><a href="source-class-FileValidationBehavior.html#339-363" title="Go to source code">_allowEmpty</a>( <span>Model <var>$model</var></span>, <span>string <var>$field</var></span>, <span>array <var>$value</var></span> )</code>

		<div class="description short">
			
<p>Allow empty file uploads to circumvent file validations.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Allow empty file uploads to circumvent file validations.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$model</var></dt>
					<dd><code>Model</code><br>$model</dd>
					<dt><var>$field</var></dt>
					<dd><code>string</code><br>$field</dd>
					<dt><var>$value</var></dt>
					<dd><code>array</code><br>$value</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="_isEmpty" id="__isEmpty">

		<td class="attributes"><code>
			 protected 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#__isEmpty">#</a>
		<code><a href="source-class-FileValidationBehavior.html#365-376" title="Go to source code">_isEmpty</a>( <span>string|array <var>$value</var></span> )</code>

		<div class="description short">
			
<p>Check if a file input field is empty.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Check if a file input field is empty.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$value</var></dt>
					<dd><code>string|array</code><br>$value</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="_validate" id="__validate">

		<td class="attributes"><code>
			 protected 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#__validate">#</a>
		<code><a href="source-class-FileValidationBehavior.html#378-440" title="Go to source code">_validate</a>( <span>Model <var>$model</var></span>, <span>array <var>$data</var></span>, <span>string <var>$method</var></span>, <span>array <var>$params</var></span> )</code>

		<div class="description short">
			
<p>Validate the field against the validation rules.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Validate the field against the validation rules.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$model</var></dt>
					<dd><code>Model</code><br>$model</dd>
					<dt><var>$data</var></dt>
					<dd><code>array</code><br>$data</dd>
					<dt><var>$method</var></dt>
					<dd><code>string</code><br>$method</dd>
					<dt><var>$params</var></dt>
					<dd><code>array</code><br>$params</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>

				<h4>Throws</h4>
				<div class="list">
					<code><code><a href="class-UnexpectedValueException.html">UnexpectedValueException</a></code></code><br />
				</div>



		</div>
		</div></td>
	</tr>
	</table>












	<table class="summary" id="properties">
	<caption>Properties summary</caption>
	<tr data-order="_defaults" id="$_defaults">
		<td class="attributes"><code>
			protected  
			array
		</code></td>

		<td class="name">
				<a href="source-class-FileValidationBehavior.html#18-70" title="Go to source code"><var>$_defaults</var></a>
		</td>
		<td class="value"><code><span class="php-keyword1">array</span>(
	<span class="php-quote">'width'</span> =&gt; <span class="php-keyword1">array</span>(
		<span class="php-quote">'rule'</span> =&gt; <span class="php-keyword1">array</span>(<span class="php-quote">'width'</span>),
		<span class="php-quote">'message'</span> =&gt; <span class="php-quote">'Your image width is invalid; required width is %s'</span>
	),
	<span class="php-quote">'height'</span> =&gt; <span class="php-keyword1">array</span>(
		<span class="php-quote">'rule'</span> =&gt; <span class="php-keyword1">array</span>(<span class="php-quote">'height'</span>),
		<span class="php-quote">'message'</span> =&gt; <span class="php-quote">'Your image height is invalid; required height is %s'</span>
	),
	<span class="php-quote">'minWidth'</span> =&gt; <span class="php-keyword1">array</span>(
		<span class="php-quote">'rule'</span> =&gt; <span class="php-keyword1">array</span>(<span class="php-quote">'minWidth'</span>),
		<span class="php-quote">'message'</span> =&gt; <span class="php-quote">'Your image width is too small; minimum width %s'</span>
	),
	<span class="php-quote">'minHeight'</span> =&gt; <span class="php-keyword1">array</span>(
		<span class="php-quote">'rule'</span> =&gt; <span class="php-keyword1">array</span>(<span class="php-quote">'minHeight'</span>),
		<span class="php-quote">'message'</span> =&gt; <span class="php-quote">'Your image height is too small; minimum height %s'</span>
	),
	<span class="php-quote">'maxWidth'</span> =&gt; <span class="php-keyword1">array</span>(
		<span class="php-quote">'rule'</span> =&gt; <span class="php-keyword1">array</span>(<span class="php-quote">'maxWidth'</span>),
		<span class="php-quote">'message'</span> =&gt; <span class="php-quote">'Your image width is too large; maximum width %s'</span>
	),
	<span class="php-quote">'maxHeight'</span> =&gt; <span class="php-keyword1">array</span>(
		<span class="php-quote">'rule'</span> =&gt; <span class="php-keyword1">array</span>(<span class="php-quote">'maxHeight'</span>),
		<span class="php-quote">'message'</span> =&gt; <span class="php-quote">'Your image height is too large; maximum height %s'</span>
	),
	<span class="php-quote">'filesize'</span> =&gt; <span class="php-keyword1">array</span>(
		<span class="php-quote">'rule'</span> =&gt; <span class="php-keyword1">array</span>(<span class="php-quote">'filesize'</span>),
		<span class="php-quote">'message'</span> =&gt; <span class="php-quote">'Your file size is too large; maximum size %s'</span>
	),
	<span class="php-quote">'extension'</span> =&gt; <span class="php-keyword1">array</span>(
		<span class="php-quote">'rule'</span> =&gt; <span class="php-keyword1">array</span>(<span class="php-quote">'extension'</span>),
		<span class="php-quote">'message'</span> =&gt; <span class="php-quote">'Your file extension is not allowed; allowed extensions: %s'</span>
	),
	<span class="php-quote">'type'</span> =&gt; <span class="php-keyword1">array</span>(
		<span class="php-quote">'rule'</span> =&gt; <span class="php-keyword1">array</span>(<span class="php-quote">'type'</span>),
		<span class="php-quote">'message'</span> =&gt; <span class="php-quote">'Your file type is not allowed; allowed types: %s'</span>
	),
	<span class="php-quote">'mimeType'</span> =&gt; <span class="php-keyword1">array</span>(
		<span class="php-quote">'rule'</span> =&gt; <span class="php-keyword1">array</span>(<span class="php-quote">'mimeType'</span>),
		<span class="php-quote">'message'</span> =&gt; <span class="php-quote">'Your file type is not allowed; allowed types: %s'</span>
	),
	<span class="php-quote">'required'</span> =&gt; <span class="php-keyword1">array</span>(
		<span class="php-quote">'rule'</span> =&gt; <span class="php-keyword1">array</span>(<span class="php-quote">'required'</span>),
		<span class="php-quote">'message'</span> =&gt; <span class="php-quote">'This file is required'</span>,
		<span class="php-quote">'on'</span> =&gt; <span class="php-quote">'create'</span>,
		<span class="php-quote">'allowEmpty'</span> =&gt; <span class="php-keyword1">true</span>
	)
)</code></td>
		<td class="description"><div>
			<a href="#$_defaults" class="anchor">#</a>

			<div class="description short">
				
<p>Default list of validation sets.</p>

			</div>

			<div class="description detailed hidden">
				
<p>Default list of validation sets.</p>


			</div>
		</div></td>
	</tr>
	<tr data-order="_validations" id="$_validations">
		<td class="attributes"><code>
			protected  
			array
		</code></td>

		<td class="name">
				<a href="source-class-FileValidationBehavior.html#72-77" title="Go to source code"><var>$_validations</var></a>
		</td>
		<td class="value"><code><span class="php-keyword1">array</span>()</code></td>
		<td class="description"><div>
			<a href="#$_validations" class="anchor">#</a>

			<div class="description short">
				
<p>Generated list of validation rules.</p>

			</div>

			<div class="description detailed hidden">
				
<p>Generated list of validation rules.</p>


			</div>
		</div></td>
	</tr>
	<tr data-order="_tempFile" id="$_tempFile">
		<td class="attributes"><code>
			protected  
			Transit\File
		</code></td>

		<td class="name">
				<a href="source-class-FileValidationBehavior.html#79-84" title="Go to source code"><var>$_tempFile</var></a>
		</td>
		<td class="value"><code></code></td>
		<td class="description"><div>
			<a href="#$_tempFile" class="anchor">#</a>

			<div class="description short">
				
<p>Temporary file used for validation only.</p>

			</div>

			<div class="description detailed hidden">
				
<p>Temporary file used for validation only.</p>


			</div>
		</div></td>
	</tr>
	</table>






</div>

	<div id="footer">
		 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
	</div>
</div>
</div>
</body>
</html>
